package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class Headshot extends Ability {

	/* toughness = 4 */
	
	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = 5202003111987014555L;

	public Headshot() {
		this.setName("Headshot");
		this.setIconName("headshot");
		this.setResource("Energy");
		this.setDirectDamageType(EDmgType.ENERGY);
		
		this.setStandardHealthPercentMax(0.197);
		this.setStandardHealthPercentMin(0.197);	
		this.setAmountModifierPercent(0.31);
		this.setCoefficient(1.97);
		
		this.setTrainableLevel(34);
	}

	@Override
	public String getDescription() {
		return "Fires a carefully placed shot that deals " +
			"(?) - (?) weapon damage to weak and standard targets, " +
			"and " + this.getMinDirect() + " - " + this.getMaxDirect() 
			+ " weapon damage to strong targets. " +
			"Only usable on incapacitated targets. " +
			"Shares a cooldown with Eviscerate.";
	}
	
	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMax()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
